package min.chapter.three;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DataSourceAcquisition {
	public static void main(String[] args) {
		String[] configLocations = new String[] {"min/chapter/three/DataSource.xml"};
		AbstractApplicationContext context = new ClassPathXmlApplicationContext(configLocations);
		context.registerShutdownHook();
		DataSource dataSourceFactory = context.getBean("dataSource", DataSource.class);
		System.out.println(dataSourceFactory.toString());
	}
}
